package com.iwinding.ladygg.net.callback;

import com.iwinding.ladygg.net.response.AuthorizeRp;
import com.iwinding.ladygg.okhttputils.callback.Callback;
import com.iwinding.ladygg.utils.GsonUtil;
import com.iwinding.ladygg.utils.LogUtil;

import okhttp3.Response;

/**
 * Created by hezhiyong on 2017/3/24.
 */

public abstract class AuthorizeCallback extends Callback<AuthorizeRp> {
    @Override
    public AuthorizeRp parseNetworkResponse(Response response, int id) throws Exception {
        String jsonStr = response.body().string();
        LogUtil.i("@hzy", "icane----Authorize:" + jsonStr);
        AuthorizeRp authorize =
                GsonUtil.getInstance().formJson(jsonStr, AuthorizeRp.class);
        return authorize;
    }

}
